<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link href="mstatic/css/bootstrap.min.css"  type="text/css" rel="stylesheet">
<link href="mstatic/css/jquery-ui.css"  type="text/css" rel="stylesheet">
<link href="mstatic/css/index.css" type="text/css" rel="stylesheet">
<title>班级活动</title>
</head>

<body>
<!--头部-->
<nav class="navbar navbar-default navbar-fixed-top  top" role="navigation">
  <div class="container-fluid">
    <div class="navbar-header" style=" width:100%;"> <a class="navbar-brand" href="javascript:history.go(-1);" style=" width:100%;  padding-right:0px;"> <span class="glyphicon glyphicon-arrow-left white"></span> 
      <!--    <span class="glyphicon glyphicon-pause white" style="margin-left:2%;"></span>--> 
      <span class="white" style="margin-left:10%">班干部任命</span> <span class="glyphicon glyphicon-user white" style="float:right"></span> </a> </div>
  </div>
  <!-- /.container-fluid --> 
</nav>
<!--头部 end--> 
<!--主体部分-->
<div>

</div>
<div class="container" style="margin-top:70px;">
	<div class="box-header with-border">
		{%foreach from=$appoint_lists key=key item=value%}
			<a href="index.php?a=cadre.list&class_id={%$value.class_id%}" {%if $value.class_id==$class_id%} class="btn btn-primary" style="color:#fff;" {%else%} class="btn btn-default"{%/if%}>{%$value.class_name%}班干部任命</a>
		{%/foreach%}  
	</div>    
  <div class="row" style="margin-top:15px;margin-left:1px; margin-right:1px;">
  
    <table class="table table-striped table-bordered text-center"  id="middles">
      <tr>
        <td>学号</td>
        <td>姓名</td>
        <td>职务</td>
        <td>操作</td>
      </tr>
      {%foreach from=$divide_lists key=key item=value%}
		<tr>
			<td>{%$value.student_no%}</a></td>
			<td>{%$value.student_name%}</td>
			<td>{%$value.leader_name%}</td>
			<td>
			<a onClick="show('{%$value.student_no%}', '{%$value.student_name%}', '{%$value.student_id%}','{%$value.divide_id%}')" href="" class="btn btn-success btn-xs" data-toggle="modal" data-target="#myModal">班干部任命</a>
			  
			</td>
		</tr>   
	{%/foreach%}  
    </table>
   <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
         <form action="" method="post">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">班干部任命</h4>
              </div>
              <div class="modal-body">
                    学号：<span id = "bbb"></span>  <span style="margin-left:20px;">姓名：</span><span id="ming"></span>
                    <div class="form-group" style="margin-top:16px;">
                        <p>班干部任命</p>
                               <select class="form-control" style="padding:0;" name="leader_id" id="">
                                     <option value="">请选择</option>
								{%foreach from=$leader_lists key=key item=value%}
                                      <option value="{%$value.leader_id%}"{%if $value.leader_id == $leader_id%}selected{%/if%}>{%$value.leader_name%}</option>
                                {%/foreach%}
                                </select>
                    </div>
              </div>
              <div class="modal-footer center-block">
			    <input type="hidden" name="divide_id" value="" id="ddd">
			    <input type="hidden" name="student_id" value="" id="ccc">
                <button type="submit" class="btn btn-primary">确 定</button>
              </div>
          </form>
    </div>
  </div>
</div>
<!--container  end--> 
{%include file="m.index.footer.tpl.php"%}
<!--主体部分  end--> 
<!--底部-->
<script>

function show(a, b, c, d){
	
	$("#bbb").html(a);
	$("#ming").html(b);
	$("#ccc").val(c);
	$("#ddd").val(d);

	
	}

</script>